<%@ page import="com.dailybule.java.dao.EmpDAO" %>
<%@ page import="com.dailybule.java.bean.Emp" %>
<%@ page import="java.util.List" %>
<%@ page import="com.dailybule.java.bean.Emp" %>
<%@ page import="com.dailybule.java.dao.EmpDAO" %><%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2024/1/20
  Time: 15:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        table {
            border: 1px gray solid;
            margin: auto;
            width: 80%;
            border-collapse: collapse;
        }

        th, td {
            border: 1px gray solid;
        }
    </style>
</head>
<body>

<%
    EmpDAO edao = new EmpDAO();
    List<Emp> list = edao.find();

%>

<table>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>职位</th>
        <th>上司ID</th>
        <th>入职时间</th>
        <th>工资</th>
        <th>奖金</th>
        <th>部门ID</th>
    </tr>
    <%
        for (Emp e : list) {
            out.print("<tr>");
            out.print("<td>" + e.getEmpno() + "</td>");
            out.print("<td>" + e.getEnname() + "</td>");
            out.print("<td>" + e.getJob() + "</td>");
            out.print("<td>" + e.getMgr() + "</td>");
            out.print("<td>" + e.getHireDate() + "</td>");
            out.print("<td>" + e.getSal() + "</td>");
            out.print("<td>" + e.getComm() + "</td>");
            out.print("<td>" + e.getDeptNo() + "</td>");
            out.print("</tr>");
        }
    %>
</table>
</body>
</html>